program main

    use error_stop_m, only: error_stop
    implicit none
    integer :: i

    write (*, '(a)', advance='no') '输入整数 (1: error msg, 2: error code): '
    read (*, *) i

    select case (i)
    case (1)
        call error_stop('error msg', 'main')
    case (2)
        call error_stop(2, 'main', no_backtrace=.true.)
    end select

end program main
